package indexer;

import java.io.File;
import java.io.IOException;
import java.sql.ResultSet;
import java.sql.SQLException;

import org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.IntField;
import org.apache.lucene.document.StoredField;
import org.apache.lucene.document.TextField;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.index.IndexWriterConfig.OpenMode;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.util.Version;

import databaseconnector.DBProcessor;

public class IndexBuilder
{
	public static void main(String[] args)
	{
		try 
		{
			//建立求房信息索引
			//Ask_index a = new Ask_index();
			//a.buildAskIndex(true);
			
			//建立租房信息索引
			//Rent_index r = new Rent_index();
			//r.buildRentIndex(true);
			
			//建立英文租房信息索引
			RentEn_index r_en = new RentEn_index();
			r_en.buildRentEnIndex(true);
			
			//建立二手房信息索引
			//SecondHand_index s = new SecondHand_index();
			//s.buildSecondHandIndex(true);
			
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
